package cn.taoticket.controller;

import cn.taoticket.common.Dto;
import cn.taoticket.service.OrderService;
import cn.taoticket.vo.CreateOrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api/v")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @RequestMapping(value = "/createOrder" ,method = RequestMethod.POST)
    public Dto createOrder(@RequestBody CreateOrderVo orderVo) throws Exception {
        return orderService.createOrder(orderVo);
    }
}
